package me.zhengjie;

import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.vo.EmailVo;
import me.zhengjie.service.EmailService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RequiredArgsConstructor
public class test {
    private final EmailService emailService;


    @Test
    public void contextLoads() {
        System.out.println(1234);
        EmailVo emailVo = new EmailVo();
        emailVo.setSubject("主题");
        emailVo.setContent("ceshi123");
        List<String> list = new ArrayList<>();
        list.add("1643187402@qq.com");
        emailVo.setTos(list);
        emailService.send(emailVo,emailService.find());

    }

    public static void main(String[] args) {
    }
}

